﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aier.dataaccess.model
{
    [XrmEntity("new_community", "new_communityid")]
    public partial class Community:BaseModel
    {
        [XrmFieldMapping("new_communityid", XrmAttributeType.UniqueIdentifier)]
        public System.Guid new_communityId { get; set; }

        [XrmFieldMapping("ownerid", XrmAttributeType.EntityReference)]
        [XrmReferenceType("systemuser", default(string))]
        public System.Guid ownerId { get; set; }

        [XrmFieldMapping("new_name", XrmAttributeType.String, true)]
        public string new_name { get; set; }

        [XrmFieldMapping("new_province", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("new_province", default(string))]
        public Nullable<System.Guid> new_province { get; set; }

        [XrmFieldMapping("new_city", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("new_city", default(string))]
        public Nullable<System.Guid> new_city { get; set; }

        [XrmFieldMapping("new_county", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("new_area", default(string))]
        public Nullable<System.Guid> new_county { get; set; }

        [XrmFieldMapping("new_street", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("new_street", default(string))]
        public Nullable<System.Guid> new_street { get; set; }

        [XrmFieldMapping("new_population", XrmAttributeType.Int, true)]
        public Nullable<int> new_population { get; set; }

        [XrmFieldMapping("new_agerange", XrmAttributeType.Int, true)]
        public Nullable<int> new_agerange { get; set; }

        [XrmFieldMapping("new_communitystatus", XrmAttributeType.Int, true)]
        public Nullable<int> new_communitystatus { get; set; }

        [XrmFieldMapping("new_failurereason", XrmAttributeType.String, true)]
        public string new_failurereason { get; set; }

        [XrmFieldMapping("new_abnormalreason", XrmAttributeType.String, true)]
        public string new_abnormalreason { get; set; }

        [XrmFieldMapping("new_contact", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("contact", default(string))]
        public Nullable<System.Guid> new_contact { get; set; }

        [XrmFieldMapping("new_mobile", XrmAttributeType.String, true)]
        public string new_mobile { get; set; }
    }
}
